/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (C) 2019 XiaoMi, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

&soc {
	led_flash0: qcom,camera-flash@0 {
		cell-index = <0>;
		compatible = "qcom,camera-flash";
		qcom,flash-source = <&pm660l_flash0 &pm660l_flash1>;
		qcom,torch-source = <&pm660l_torch0 &pm660l_torch1>;
		qcom,switch-source = <&pm660l_switch0>;
		status = "ok";
	};

	led_flash1: qcom,camera-flash@1 {
		cell-index = <1>;
		compatible = "qcom,camera-flash";
		qcom,flash-source = <&pm660l_flash2>;
		qcom,torch-source = <&pm660l_torch2>;
		qcom,switch-source = <&pm660l_switch1>;
		status = "ok";
	};

	cam_avdd_gpio_regulator: cam_avdd_fixed_regulator {
		compatible = "regulator-fixed";
		regulator-name = "cam_avdd_gpio_regulator";
		regulator-min-microvolt = <2800000>;//3600000
		regulator-max-microvolt = <2800000>;
		enable-active-high;
		gpio = <&tlmm 46 0>;
		vin-supply = <&pm660l_bob>;
	};

	cam_rear_avdd_gpio_regulator: cam_rear_avdd_fixed_regulator {
		compatible = "regulator-fixed";
		regulator-name = "cam_rear_avdd_gpio_regulator";
		regulator-min-microvolt = <2800000>;
		regulator-max-microvolt = <2800000>;
		enable-active-high;
		gpio = <&tlmm 51 0>;
		vin-supply = <&pm660l_bob>;
	};
	cam_rear_dvdd_gpio_regulator: cam_rear_dvdd_fixed_regulator {
		compatible = "regulator-fixed";
		regulator-name = "cam_rear_dvdd_gpio_regulator";
		regulator-min-microvolt = <1200000>;//1350000
		regulator-max-microvolt = <1200000>;
		enable-active-high;
		gpio = <&pm660l_gpios 4 0>;
		vin-supply = <&pm660_s5>;
	};
};

&cci {
	actuator1: qcom,actuator@1 {
		cell-index = <1>;
		reg = <0x1>;
		compatible = "qcom,actuator";
		qcom,cci-master = <1>;
		gpios = <&tlmm 50 0>;
		qcom,gpio-vaf = <0>;
		qcom,gpio-req-tbl-num = <0>;
		qcom,gpio-req-tbl-flags = <0>;
		qcom,gpio-req-tbl-label = "CAM_VAF";
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_actuator_vaf_active>;
		pinctrl-1 = <&cam_actuator_vaf_suspend>;
	};

	eeprom0: qcom,eeprom@0 {
		cell-index = <0>;
		reg = <0x0>;
		compatible = "qcom,eeprom";
		qcom,eeprom-name = "tulip_s5k5e8_ofilm_i";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0x30>;
		qcom,num-blocks = <27>;

		//init4
		qcom,page0 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll0 = <0 0x0 2 0 1 1>;
		qcom,mem0 = <0 0x0 2 0 1 0>;

		//set page  4  ----
		qcom,page1 = <1 0x0A02 2 0x04 1 1>;
		qcom,poll1 = <0 0x0 2 0 1 1>;
		qcom,mem1 = <0 0x0 2 0 1 0>;

		//read value
		qcom,page2 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll2 = <0 0x0 2 0 1 1>;
		qcom,mem2 = <16 0x0A34 2 0 1 0>;

		//init5
		qcom,page3 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll3 = <0 0x0 2 0 1 1>;
		qcom,mem3 = <0 0x0 2 0 1 0>;

		//set page  5  ----
		qcom,page4 = <1 0x0A02 2 0x05 1 1>;
		qcom,poll4 = <0 0x0 2 0 1 1>;
		qcom,mem4 = <0 0x0 2 0 1 0>;

		//read value
		qcom,page5 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll5 = <0 0x00 2 0 1 1>;
		qcom,mem5 = <64 0x0A04 2 0 1 0>;

		//init6
		qcom,page6 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll6 = <0 0x0 2 0 1 1>;
		qcom,mem6 = <0 0x0 2 0 1 0>;

		//set page  6  ----
		qcom,page7 = <1 0x0A02 2 0x06 1 1>;
		qcom,poll7= <0 0x0 2 0 1 1>;
		qcom,mem7 = <0 0x0 2 0 1 0>;

		//read value
		qcom,page8= <1 0x0A00 2 0x01 1 5>;
		qcom,poll8 = <0 0x00 2 0 1 1>;
		qcom,mem8 = <64 0x0A04 2 0 1 0>;

		//init7
		qcom,page9 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll9 = <0 0x0 2 0 1 1>;
		qcom,mem9 = <0 0x0 2 0 1 0>;

		//set page  7  ----
		qcom,page10 = <1 0x0A02 2 0x07 1 1>;
		qcom,poll10= <0 0x0 2 0 1 1>;
		qcom,mem10 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page11 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll11 = <0 0x00 2 0 1 1>;
		qcom,mem11 = <64 0x0A04 2 0 1 0>;

		//init8
		qcom,page12 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll12 = <0 0x0 2 0 1 1>;
		qcom,mem12 = <0 0x0 2 0 1 0>;

		//set page  8  ----
		qcom,page13 = <1 0x0A02 2 0x08 1 1>;
		qcom,poll13= <0 0x0 2 0 1 1>;
		qcom,mem13 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page14 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll14 = <0 0x00 2 0 1 1>;
		qcom,mem14 = <64 0x0A04 2 0 1 0>;

		//init9
		qcom,page15 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll15 = <0 0x0 2 0 1 1>;
		qcom,mem15 = <0 0x0 2 0 1 0>;

		//set page  9  ----
		qcom,page16 = <1 0x0A02 2 0x09 1 1>;
		qcom,poll16= <0 0x0 2 0 1 1>;
		qcom,mem16 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page17 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll17 = <0 0x00 2 0 1 1>;
		qcom,mem17 = <64 0x0A04 2 0 1 0>;

		//init10
		qcom,page18 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll18 = <0 0x0 2 0 1 1>;
		qcom,mem18 = <0 0x0 2 0 1 0>;

		//set page  10  ----
		qcom,page19 = <1 0x0A02 2 0x0A 1 1>;
		qcom,poll19= <0 0x0 2 0 1 1>;
		qcom,mem19 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page20 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll20 = <0 0x0 2 0 1 1>;
		qcom,mem20 = <24 0x0A04 2 0 1 0>;

		//init14
		qcom,page21= <1 0x0A00 2 0x04 1 1>;
		qcom,poll21 = <0 0x0 2 0 1 1>;
		qcom,mem21 = <0 0x0 2 0 1 0>;

		//set page  14  ----
		qcom,page22 = <1 0x0A02 2 0x0E 1 1>;
		qcom,poll22= <0 0x0 2 0 1 1>;
		qcom,mem22 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page23 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll23 = <0 0x0 2 0 1 1>;
		qcom,mem23 = <64 0x0A04 2 0 1 0>;

		//init15
		qcom,page24 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll24 = <0 0x0 2 0 1 1>;
		qcom,mem24 = <0 0x0 2 0 1 0>;

		//set page  15  ----
		qcom,page25 = <1 0x0A02 2 0x0F 1 1>;
		qcom,poll25= <0 0x0 2 0 1 1>;
		qcom,mem25 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page26 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll26 = <0 0x0 2 0 1 1>;
		qcom,mem26 = <15 0x0A04 2 0 1 0>;

		cam_vio-supply = <&pm660_l11>;//1.8
		cam_vana-supply = <&cam_avdd_gpio_regulator>;//2.8
		cam_vdig-supply = <&cam_rear_dvdd_gpio_regulator>;//1.2
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk3_active
				 &cam_sensor_front_iris_active>;
		pinctrl-1 = <&cam_sensor_mclk3_suspend
				 &cam_sensor_front_iris_suspend>;
		gpios = <&tlmm 35 0>,
			<&tlmm 52 0>,
			<&tlmm 45 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vaf = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0",
					"CAM_VAF";
		qcom,cam-power-seq-type = "sensor_gpio","sensor_vreg","sensor_vreg","sensor_gpio","sensor_vreg","sensor_clk","sensor_gpio";
		qcom,cam-power-seq-val = "sensor_gpio_reset","cam_vana","cam_vdig","sensor_gpio_vaf","cam_vio","sensor_cam_mclk","sensor_gpio_reset";
		qcom,cam-power-seq-cfg-val = <0 1 1 1 1 24000000 1>;
		qcom,cam-power-seq-delay =    <1 5 5 5 5 1 10>;
		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK3_CLK_SRC>,
				<&clock_mmss MMSS_CAMSS_MCLK3_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};


	eeprom1: qcom,eeprom@1 {
		cell-index = <1>;
		reg = <0x1>;
		compatible = "qcom,eeprom";
		//qcom,eeprom-name = "tulip_s5k3T1_sunny_i";
		//qcom,lct_eeprom-name must same as camera.xml eeprom name in vendor
		qcom,lct_eeprom-name = "tulip_s5k3T1_sunny_i";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0xa2>;
		qcom,cci-master = <1>;
		qcom,num-blocks = <1>;

		qcom,page0 = <0 0x0000 2 0x00 1 0>;
		qcom,poll0 = <0 0x0 2 0x0 1 0>;
		qcom,mem0 = <7158 0x0000 2 0x0 1 0>;

		cam_vio-supply = <&pm660_l11>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana";
		cam_vana-supply = <&cam_rear_avdd_gpio_regulator>;
		qcom,cam-vreg-min-voltage = <1800000 0>;
		qcom,cam-vreg-max-voltage = <1800000 0>;
		qcom,cam-vreg-op-mode = <105000 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk1_active
				 &cam_sensor_front_active>;
		pinctrl-1 = <&cam_sensor_mclk1_suspend
				 &cam_sensor_front_suspend>;
		gpios = <&tlmm 33 0>,
			<&tlmm 47 0>,
			<&pm660l_gpios 3 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vdig = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK1",
					"CAM_RESET1",
					"CAM_VDIG";

		qcom,cam-power-seq-type = "sensor_gpio","sensor_vreg","sensor_vreg","sensor_vreg","sensor_gpio",
			"sensor_clk";
		qcom,cam-power-seq-val = "sensor_gpio_reset","cam_vana","cam_vdig","cam_vio","sensor_cam_mclk",
			"sensor_gpio_reset";
		qcom,cam-power-seq-cfg-val = <0 0 0 0 1 24000000>;
		qcom,cam-power-seq-delay =	  <1 0 0 0 5 10>;

		qcom,sensor-position = <1>;
		qcom,sensor-mode = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK1_CLK_SRC>,
			<&clock_mmss MMSS_CAMSS_MCLK1_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	eeprom2: qcom,eeprom@2 {
		cell-index = <2>;
		reg = <0x2>;
		compatible = "qcom,eeprom";
		qcom,eeprom-name = "tulip_ov02a10_ofilm_ii";
		//qcom,lct_eeprom-name must same as camera.xml eeprom name in vendor
		//qcom,lct_eeprom-name = "tulip_ov02a10_ofilm_ii";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0xa0>;
		qcom,cci-master = <0>;
		qcom,num-blocks = <1>;

		qcom,page0 = <0 0x0000 2 0x00 1 0>;
		qcom,poll0 = <0 0x0 2 0x0 1 0>;
		qcom,mem0 = <7158 0x0000 2 0x0 1 0>;

		cam_vio-supply = <&pm660_l11>;
		cam_vana-supply = <&cam_avdd_gpio_regulator>;
		//cam_vdig-supply = <&cam_dvdd_gpio_regulator>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig" ;
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk2_active
				 &cam_sensor_front_b_active>;
		pinctrl-1 = <&cam_sensor_mclk2_suspend
				 &cam_sensor_front_b_suspend>;
		gpios = <&tlmm 34 0>,
			<&tlmm 52 0>,
			<&tlmm 40 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-standby = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK2",
					"CAM_RESET2",
					"CAM_STANDBY2";

		qcom,cam-power-seq-type = "sensor_gpio","sensor_gpio","sensor_vreg","sensor_vreg",
			"sensor_vreg","sensor_gpio","sensor_gpio","sensor_clk";
		qcom,cam-power-seq-val = "sensor_gpio_standby","sensor_gpio_reset","cam_vana","cam_vdig",
		    "cam_vio","sensor_gpio_standby","sensor_gpio_reset","sensor_cam_mclk";
		qcom,cam-power-seq-cfg-val = <1 1 1 1 1 0 0 24000000>;
		qcom,cam-power-seq-delay =	 <1 5 5 5 5 5 5 10>;

		qcom,sensor-position = <1>;
		qcom,sensor-mode = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK2_CLK_SRC>,
			<&clock_mmss MMSS_CAMSS_MCLK2_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};


	eeprom3: qcom,eeprom@3 {
		cell-index = <3>;
		reg = <0x3>;
		//qcom,eeprom-name = "tulip_s5k2l7_ofilm_i";
		//qcom,lct_eeprom-name must same as camera.xml eeprom name in vendor
		qcom,lct_eeprom-name = "tulip_s5k2l7_ofilm_i";
		compatible = "qcom,eeprom";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0xa8>;
		qcom,cci-master = <1>;
		qcom,num-blocks = <1>;

		qcom,page0 = <0 0x0000 2 0x00 1 0>;
		qcom,poll0 = <0 0x0 2 0x0 1 0>;
		qcom,mem0 = <7158 0x0000 2 0x0 1 0>;
		cam_vio-supply = <&pm660_l11>;
		cam_vana-supply = <&cam_rear_avdd_gpio_regulator>;
		cam_vdig-supply = <&cam_rear_dvdd_gpio_regulator>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk0_active
				 &cam_sensor_rear2_active>;
		pinctrl-1 = <&cam_sensor_mclk0_suspend
				 &cam_sensor_rear2_suspend>;
		gpios = <&tlmm 32 0>,
			<&tlmm 48 0>,
			<&tlmm 50 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vaf = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0",
					"CAM_VAF";

		qcom,cam-power-seq-type = "sensor_gpio","sensor_vreg","sensor_vreg","sensor_gpio","sensor_vreg",
			"sensor_clk","sensor_gpio";
		qcom,cam-power-seq-val = "sensor_gpio_reset","cam_vdig","cam_vio", "sensor_gpio_vaf","cam_vana",
			"sensor_cam_mclk","sensor_gpio_reset";
		qcom,cam-power-seq-cfg-val = <0 1 1 1 1 24000000 1>;
		qcom,cam-power-seq-delay =	  <5 0 5 5 5 5 5>;

	    qcom,sensor-mode = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK0_CLK_SRC>,
				<&clock_mmss MMSS_CAMSS_MCLK0_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <19200000 0>;
	};

	eeprom4: qcom,eeprom@4 {
		cell-index = <4>;
		reg = <0x4>;
		//qcom,eeprom-name = "tulip_s5k2l7_qtech_ii";
		qcom,lct_eeprom-name = "tulip_s5k2l7_qtech_ii";
		compatible = "qcom,eeprom";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0xa8>;
		qcom,cci-master = <1>;
		qcom,num-blocks = <1>;

		qcom,page0 = <0 0x0000 2 0x00 1 0>;
		qcom,poll0 = <0 0x0 2 0x0 1 0>;
		qcom,mem0 = <7158 0x0000 2 0x0 1 0>;
		cam_vio-supply = <&pm660_l11>;
		cam_vana-supply = <&cam_rear_avdd_gpio_regulator>;
		cam_vdig-supply = <&cam_rear_dvdd_gpio_regulator>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk0_active
				 &cam_sensor_rear2_active>;
		pinctrl-1 = <&cam_sensor_mclk0_suspend
				 &cam_sensor_rear2_suspend>;
		gpios = <&tlmm 32 0>,
			<&tlmm 48 0>,
			<&tlmm 50 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vaf = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0",
					"CAM_VAF";

		qcom,cam-power-seq-type = "sensor_gpio","sensor_vreg","sensor_vreg","sensor_gpio","sensor_vreg",
			"sensor_clk","sensor_gpio";
		qcom,cam-power-seq-val = "sensor_gpio_reset","cam_vdig","cam_vio", "sensor_gpio_vaf","cam_vana",
			"sensor_cam_mclk","sensor_gpio_reset";
		qcom,cam-power-seq-cfg-val = <0 1 1 1 1 24000000 1>;
		qcom,cam-power-seq-delay =	  <5 0 5 5 5 5 5>;

		qcom,sensor-mode = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK0_CLK_SRC>,
				<&clock_mmss MMSS_CAMSS_MCLK0_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <19200000 0>;
	};

	eeprom5: qcom,eeprom@5 {
		cell-index = <5>;
		reg = <0x5>;
		compatible = "qcom,eeprom";
		qcom,eeprom-name = "tulip_ov02a10_sunny_i";
		//qcom,lct_eeprom-name must same as camera.xml eeprom name in vendor
		//qcom,lct_eeprom-name = "tulip_ov02a10_sunny_i";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0xa2>;
		qcom,cci-master = <0>;
		qcom,num-blocks = <1>;

		qcom,page0 = <0 0x0000 2 0x00 1 0>;
		qcom,poll0 = <0 0x0 2 0x0 1 0>;
		qcom,mem0 = <7158 0x0000 2 0x0 1 0>;

		cam_vio-supply = <&pm660_l11>;
		cam_vana-supply = <&cam_avdd_gpio_regulator>;
		//cam_vdig-supply = <&cam_dvdd_gpio_regulator>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk2_active
				 &cam_sensor_front_b_active>;
		pinctrl-1 = <&cam_sensor_mclk2_suspend
				 &cam_sensor_front_b_suspend>;
		gpios = <&tlmm 34 0>,
			<&tlmm 52 0>,
			<&tlmm 40 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-standby = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK2",
					"CAM_RESET2",
					"CAM_STANDBY2";

		qcom,cam-power-seq-type = "sensor_gpio","sensor_gpio","sensor_vreg","sensor_vreg",
			"sensor_vreg","sensor_gpio","sensor_gpio","sensor_clk";
		qcom,cam-power-seq-val = "sensor_gpio_standby","sensor_gpio_reset","cam_vana","cam_vdig",
		    "cam_vio","sensor_gpio_standby","sensor_gpio_reset","sensor_cam_mclk";
		qcom,cam-power-seq-cfg-val = <1 1 1 1 1 0 0 24000000>;
		qcom,cam-power-seq-delay =	 <1 5 5 5 5 5 5 10>;

		qcom,sensor-position = <1>;
		qcom,sensor-mode = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK2_CLK_SRC>,
			<&clock_mmss MMSS_CAMSS_MCLK2_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	eeprom6: qcom,eeprom@6 {
		cell-index = <6>;
		reg = <0x6>;
		compatible = "qcom,eeprom";
		//qcom,eeprom-name = "tulip_s5k3T1_ofilm_ii";
		//qcom,lct_eeprom-name must same as camera.xml eeprom name in vendor
		qcom,lct_eeprom-name = "tulip_s5k3T1_ofilm_ii";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0xa2>;
		qcom,cci-master = <1>;
		qcom,num-blocks = <1>;

		qcom,page0 = <0 0x0000 2 0x00 1 0>;
		qcom,poll0 = <0 0x0 2 0x0 1 0>;
		qcom,mem0 = <7158 0x0000 2 0x0 1 0>;

		cam_vio-supply = <&pm660_l11>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana";
		cam_vana-supply = <&cam_rear_avdd_gpio_regulator>;
		qcom,cam-vreg-min-voltage = <1800000 0>;
		qcom,cam-vreg-max-voltage = <1800000 0>;
		qcom,cam-vreg-op-mode = <105000 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk1_active
				 &cam_sensor_front_active>;
		pinctrl-1 = <&cam_sensor_mclk1_suspend
				 &cam_sensor_front_suspend>;
		gpios = <&tlmm 33 0>,
			<&tlmm 47 0>,
			<&pm660l_gpios 3 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vdig = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK1",
					"CAM_RESET1",
					"CAM_VDIG";

		qcom,cam-power-seq-type = "sensor_gpio","sensor_vreg","sensor_vreg","sensor_vreg","sensor_gpio",
			"sensor_clk";
		qcom,cam-power-seq-val = "sensor_gpio_reset","cam_vana","cam_vdig","cam_vio","sensor_cam_mclk",
			"sensor_gpio_reset";
		qcom,cam-power-seq-cfg-val = <0 0 0 0 1 24000000>;
		qcom,cam-power-seq-delay =	  <1 0 0 0 5 10>;

		qcom,sensor-position = <1>;
		qcom,sensor-mode = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK1_CLK_SRC>,
			<&clock_mmss MMSS_CAMSS_MCLK1_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;

	};

	eeprom7: qcom,eeprom@7 {
		cell-index = <7>;
		reg = <0x7>;
		compatible = "qcom,eeprom";
		qcom,eeprom-name = "tulip_s5k5e8_qtech_ii";
		qcom,i2c-freq-mode = <1>;
		qcom,slave-addr = <0x30>;
		qcom,num-blocks = <27>;

		//init4
		qcom,page0 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll0 = <0 0x0 2 0 1 1>;
		qcom,mem0 = <0 0x0 2 0 1 0>;

		//set page	4  ----
		qcom,page1 = <1 0x0A02 2 0x04 1 1>;
		qcom,poll1 = <0 0x0 2 0 1 1>;
		qcom,mem1 = <0 0x0 2 0 1 0>;

		//read value
		qcom,page2 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll2 = <0 0x0 2 0 1 1>;
		qcom,mem2 = <16 0x0A34 2 0 1 0>;

		//init5
		qcom,page3 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll3 = <0 0x0 2 0 1 1>;
		qcom,mem3 = <0 0x0 2 0 1 0>;

		//set page	5  ----
		qcom,page4 = <1 0x0A02 2 0x05 1 1>;
		qcom,poll4 = <0 0x0 2 0 1 1>;
		qcom,mem4 = <0 0x0 2 0 1 0>;

		//read value
		qcom,page5 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll5 = <0 0x00 2 0 1 1>;
		qcom,mem5 = <64 0x0A04 2 0 1 0>;

		//init6
		qcom,page6 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll6 = <0 0x0 2 0 1 1>;
		qcom,mem6 = <0 0x0 2 0 1 0>;

		//set page	6  ----
		qcom,page7 = <1 0x0A02 2 0x06 1 1>;
		qcom,poll7= <0 0x0 2 0 1 1>;
		qcom,mem7 = <0 0x0 2 0 1 0>;

		//read value
		qcom,page8= <1 0x0A00 2 0x01 1 5>;
		qcom,poll8 = <0 0x00 2 0 1 1>;
		qcom,mem8 = <64 0x0A04 2 0 1 0>;

		//init7
		qcom,page9 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll9 = <0 0x0 2 0 1 1>;
		qcom,mem9 = <0 0x0 2 0 1 0>;

		//set page	7  ----
		qcom,page10 = <1 0x0A02 2 0x07 1 1>;
		qcom,poll10= <0 0x0 2 0 1 1>;
		qcom,mem10 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page11 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll11 = <0 0x00 2 0 1 1>;
		qcom,mem11 = <64 0x0A04 2 0 1 0>;

		//init8
		qcom,page12 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll12 = <0 0x0 2 0 1 1>;
		qcom,mem12 = <0 0x0 2 0 1 0>;

		//set page	8  ----
		qcom,page13 = <1 0x0A02 2 0x08 1 1>;
		qcom,poll13= <0 0x0 2 0 1 1>;
		qcom,mem13 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page14 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll14 = <0 0x00 2 0 1 1>;
		qcom,mem14 = <64 0x0A04 2 0 1 0>;

			//init9
		qcom,page15 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll15 = <0 0x0 2 0 1 1>;
		qcom,mem15 = <0 0x0 2 0 1 0>;

		//set page	9  ----
		qcom,page16 = <1 0x0A02 2 0x09 1 1>;
		qcom,poll16= <0 0x0 2 0 1 1>;
		qcom,mem16 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page17 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll17 = <0 0x00 2 0 1 1>;
		qcom,mem17 = <64 0x0A04 2 0 1 0>;

		//init10
		qcom,page18 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll18 = <0 0x0 2 0 1 1>;
		qcom,mem18 = <0 0x0 2 0 1 0>;

		//set page	10	----
		qcom,page19 = <1 0x0A02 2 0x0A 1 1>;
		qcom,poll19= <0 0x0 2 0 1 1>;
		qcom,mem19 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page20 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll20 = <0 0x0 2 0 1 1>;
		qcom,mem20 = <24 0x0A04 2 0 1 0>;

		//init14
		qcom,page21= <1 0x0A00 2 0x04 1 1>;
		qcom,poll21 = <0 0x0 2 0 1 1>;
		qcom,mem21 = <0 0x0 2 0 1 0>;

		//set page	14	----
		qcom,page22 = <1 0x0A02 2 0x0E 1 1>;
		qcom,poll22= <0 0x0 2 0 1 1>;
		qcom,mem22 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page23 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll23 = <0 0x0 2 0 1 1>;
		qcom,mem23 = <64 0x0A04 2 0 1 0>;

		//init15
		qcom,page24 = <1 0x0A00 2 0x04 1 1>;
		qcom,poll24 = <0 0x0 2 0 1 1>;
		qcom,mem24 = <0 0x0 2 0 1 0>;

		//set page	15	----
		qcom,page25 = <1 0x0A02 2 0x0F 1 1>;
		qcom,poll25= <0 0x0 2 0 1 1>;
		qcom,mem25 = <0 0x0 2 0 1 0>;

		//set read mode of nvm
		qcom,page26 = <1 0x0A00 2 0x01 1 5>;
		qcom,poll26 = <0 0x0 2 0 1 1>;
		qcom,mem26 = <15 0x0A04 2 0 1 0>;

		cam_vio-supply = <&pm660_l11>;//1.8
		cam_vana-supply = <&cam_avdd_gpio_regulator>;//2.8
		cam_vdig-supply = <&cam_rear_dvdd_gpio_regulator>;//1.2
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk3_active
				 &cam_sensor_front_iris_active>;
		pinctrl-1 = <&cam_sensor_mclk3_suspend
				 &cam_sensor_front_iris_suspend>;
		gpios = <&tlmm 35 0>,
			<&tlmm 52 0>,
			<&tlmm 45 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vaf = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0",
					"CAM_VAF";
		qcom,cam-power-seq-type = "sensor_gpio","sensor_vreg","sensor_vreg","sensor_gpio","sensor_vreg","sensor_clk","sensor_gpio";
		qcom,cam-power-seq-val = "sensor_gpio_reset","cam_vana","cam_vdig","sensor_gpio_vaf","cam_vio","sensor_cam_mclk","sensor_gpio_reset";
		qcom,cam-power-seq-cfg-val = <0 1 1 1 1 24000000 1>;
		qcom,cam-power-seq-delay =    <1 5 5 5 5 1 10>;

		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK3_CLK_SRC>,
				<&clock_mmss MMSS_CAMSS_MCLK3_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
		};

	qcom,camera@0 {
		cell-index = <0>;
		compatible = "qcom,camera";
		reg = <0x0>;
		qcom,csiphy-sd-index = <1>;
		qcom,csid-sd-index = <1>;
		qcom,mount-angle = <90>;
		//qcom,led-flash-src = <&led_flash0>;
		//qcom,actuator-src = <&actuator0>;
		//qcom,ois-src = <&ois0>;
		qcom,eeprom-src = <&eeprom0 &eeprom7>;
		cam_vio-supply = <&pm660_l11>;//1.8
		cam_vana-supply = <&cam_avdd_gpio_regulator>;//2.8
		cam_vdig-supply = <&cam_rear_dvdd_gpio_regulator>;//1.2
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk3_active
				 &cam_sensor_front_iris_active>;
		pinctrl-1 = <&cam_sensor_mclk3_suspend
				 &cam_sensor_front_iris_suspend>;
		gpios = <&tlmm 35 0>,
			<&tlmm 52 0>,
			<&tlmm 45 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vdig = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0",
					"CAM_VDIG";
		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK3_CLK_SRC>,
				<&clock_mmss MMSS_CAMSS_MCLK3_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	qcom,camera@1 {
		cell-index = <1>;
		compatible = "qcom,camera";
		reg = <0x1>;
		qcom,csiphy-sd-index = <0>;
		qcom,csid-sd-index = <0>;
		qcom,mount-angle = <90>;
		qcom,led-flash-src = <&led_flash0>;
		qcom,actuator-src = <&actuator1>;
		//qcom,ois-src = <&ois0>;
		qcom,eeprom-src = <&eeprom3 &eeprom4>;
		cam_vio-supply = <&pm660_l11>;
		cam_vana-supply = <&cam_rear_avdd_gpio_regulator>;
		cam_vdig-supply = <&cam_rear_dvdd_gpio_regulator>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana", "cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk0_active
				 &cam_sensor_rear2_active>;
		pinctrl-1 = <&cam_sensor_mclk0_suspend
				 &cam_sensor_rear2_suspend>;
		gpios = <&tlmm 32 0>,
			<&tlmm 48 0>,
			<&tlmm 50 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vaf = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK0",
					"CAM_RESET0",
					"CAM_VAF";
		qcom,sensor-position = <0>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <1>;
		status = "ok";
		clocks = <&clock_mmss MCLK0_CLK_SRC>,
				<&clock_mmss MMSS_CAMSS_MCLK0_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	qcom,camera@2 {
		cell-index = <2>;
		compatible = "qcom,camera";
		reg = <0x02>;
		qcom,csiphy-sd-index = <2>;
		qcom,csid-sd-index = <2>;
		qcom,mount-angle = <270>;
		//qcom,led-flash-src = <&led_flash1>;
		qcom,eeprom-src = <&eeprom1 &eeprom6>;
		cam_vio-supply = <&pm660_l11>;
		cam_vana-supply = <&cam_rear_avdd_gpio_regulator>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana";
		qcom,cam-vreg-min-voltage = <1800000 0>;
		qcom,cam-vreg-max-voltage = <1800000 0>;
		qcom,cam-vreg-op-mode = <105000 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk1_active
				 &cam_sensor_front_active>;
		pinctrl-1 = <&cam_sensor_mclk1_suspend
				 &cam_sensor_front_suspend>;
		gpios = <&tlmm 33 0>,
			<&tlmm 47 0>,
			<&pm660l_gpios 3 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-vdig = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK1",
					"CAM_RESET1",
					"CAM_VDIG";
		qcom,sensor-position = <1>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <1>;
		status = "ok";
		clocks = <&clock_mmss MCLK1_CLK_SRC>,
			<&clock_mmss MMSS_CAMSS_MCLK1_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};

	qcom,camera@3 {
		cell-index = <3>;
		compatible = "qcom,camera";
		reg = <0x03>;
		qcom,csiphy-sd-index = <1>;
		qcom,csid-sd-index = <1>;
		qcom,mount-angle = <90>;
		//qcom,led-flash-src = <&led_flash1>;
		//qcom,actuator-src = <&actuator2>;
		qcom,eeprom-src = <&eeprom2 &eeprom5>;
		cam_vio-supply = <&pm660_l11>;
		cam_vana-supply = <&cam_avdd_gpio_regulator>;
		//cam_vdig-supply = <&cam_dvdd_gpio_regulator>;
		qcom,cam-vreg-name = "cam_vio", "cam_vana","cam_vdig";
		qcom,cam-vreg-min-voltage = <1780000 0 0>;
		qcom,cam-vreg-max-voltage = <1950000 0 0>;
		qcom,cam-vreg-op-mode = <105000 0 0>;
		qcom,gpio-no-mux = <0>;
		pinctrl-names = "cam_default", "cam_suspend";
		pinctrl-0 = <&cam_sensor_mclk2_active
				 &cam_sensor_front_b_active>;
		pinctrl-1 = <&cam_sensor_mclk2_suspend
				 &cam_sensor_front_b_suspend>;
		gpios = <&tlmm 34 0>,
			<&tlmm 52 0>,
			<&tlmm 40 0>;
		qcom,gpio-reset = <1>;
		qcom,gpio-standby = <2>;
		qcom,gpio-req-tbl-num = <0 1 2>;
		qcom,gpio-req-tbl-flags = <1 0 0>;
		qcom,gpio-req-tbl-label = "CAMIF_MCLK2",
					"CAM_RESET2",
					"CAM_STANDBY2";
		qcom,sensor-position = <1>;
		qcom,sensor-mode = <0>;
		qcom,cci-master = <0>;
		status = "ok";
		clocks = <&clock_mmss MCLK2_CLK_SRC>,
			<&clock_mmss MMSS_CAMSS_MCLK2_CLK>;
		clock-names = "cam_src_clk", "cam_clk";
		qcom,clock-rates = <24000000 0>;
	};
};
